﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" xmlns:local="clr-namespace:EF41RiaServicesSample" x:Class="EF41RiaServicesSample.MainPage"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

	<UserControl.DataContext>
		<local:MainViewModel/>
	</UserControl.DataContext>

    <Grid x:Name="LayoutRoot" Background="White">
        <sdk:DataGrid AutoGenerateColumns="False" Height="199" HorizontalAlignment="Left" Margin="8,19,0,0" x:Name="dataGrid1" VerticalAlignment="Top" Width="375" ItemsSource="{Binding Drivers}" >
        	<sdk:DataGrid.Columns>
        		<sdk:DataGridTextColumn Header="名前" Width="*" Binding="{Binding DriverName}"/>
        		<sdk:DataGridTextColumn Header="年齢" Width="0.5*" Binding="{Binding Age}"/>
        		<sdk:DataGridTextColumn Header="国" Width="*" Binding="{Binding Countries.CountryName}"/>
        	</sdk:DataGrid.Columns>
        </sdk:DataGrid>
        <Button Content="取得" Height="23" HorizontalAlignment="Left" Margin="168,247,0,0" x:Name="button1" VerticalAlignment="Top" Width="75" Command="{Binding GetCommand, Mode=OneWay}" />
    </Grid>
</UserControl>
